package ;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.geom.Point;
import flash.geom.Rectangle;

class Asteroid extends Sprite
{
	public var wx:Float;
	public var wy:Float;
	
	var _index:Float;
	static var bitmapData:BitmapData = null;
		
	public function new(index:Int) 
	{
		
	}
	
	private function mod(x:Float):Float
	{
		var r:Float = x % 1200;
		
		return r < -16 ? r + 1200 : r;
	}
	
	public function cameraUpdate():Void
	{
		x = mod((wx - (Camera.bound.x * _index)));
		y = mod((wy - (Camera.bound.y * _index)));
	}
}